package com.tsy.server.system.entity.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 验证邮箱验证码请求参数
 */
@Data
@ApiModel(value = "验证邮箱验证码请求参数", description = "验证邮箱验证码时需要提交的信息")
public class VerifyCodeDTO {

    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱", required = true, example = "example@example.com")
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    private String email;

    /**
     * 验证码
     */
    @ApiModelProperty(value = "验证码", required = true, example = "123456")
    @NotBlank(message = "验证码不能为空")
    @Size(min = 6, max = 6, message = "验证码长度必须为6位")
    private String code;
}